const token = {
    state: {
        token: '',
        deptId: '',
        deptName: '',
        userid: '',
        name: '', // 用户名
        username: '', // 工号
        tenementId: '', // 租户id
        systemCode: '', // 系统编号
        logo: '', // 网站logo
        homeOpenLogo: '', // 网站展开logo
        deptType: '', // 机构类型
        code: '', // 机构编号
        avatar: '', // 头像url
        sellerId: '', // 商户id
        systemId: '', // 系统id
        isOpenMenu: true, // 是否展开菜单
        authList: [],
        routeList: [], // 面包屑导航
        basic_activeTab: '1',
        basic_show_Tab: '1',
        early_activeTab: '1',
        early_show_Tab: '1',
        ingestion_activeTab: '1',
        ingestion_show_Tab: '1',
        longterm_activeTab: '1',
        longterm_show_Tab: '1',
        senstivity_activeTab: '1',
        senstivity_show_Tab: '1',
        basic_Data:{},
        early_Data:{},
        longterm_Data:{},
        ingestion_Data:{},
        senstivity_Data:{},

    },
    mutations: {
        UPDATE_TOKEN: (state, token) => {
            state.token = token
        },
        UPDATE_DEPTID: (state, deptId) => {
            state.deptId = deptId
        },
        UPDATE_DEPTNAME: (state, deptName) => {
            state.deptName = deptName
        },
        UPDATE_USERID: (state, userid) => {
            state.userid = userid
        },
        UPDATE_USERNAME: (state, username) => {
            state.username = username
        },
        UPDATE_NAME: (state, name) => {
            state.name = name;
        },
        UPDATE_TENEMENTID: (state, tenementId) => {
            state.tenementId = tenementId
        },
        UPDATE_SYSTEMCODE: (state, systemCode) => {
            state.systemCode = systemCode
        },
        UPDATE_LOGO: (state, logo) => {
            state.logo = logo;
        },
        UPDATE_homeOpenLogo: (state, logo) => {
            state.homeOpenLogo = logo;
        },
        UPDATE_DEPTTYPE: (state, type) => {
            state.deptType = type;
        },
        UPDATE_DEPTCODE: (state, code) => {
            state.code = code;
        },
        UPDATE_AVATAR: (state, url) => {
            state.avatar = url;
        },
        UPDATE_SELLER_ID: (state, sellerId) => {
            state.sellerId = sellerId;
        },
        update_systemId: (state, sysId) => {
            state.systemId = sysId;
        },
        commit_isOpenMenu: (state, flag) => {
            state.isOpenMenu = flag;
        },
        updateRoute: (state, list) => {
            state.routeList = list;
        },





        change_basic_activeTab: (state, activeTab) => {
            state.basic_activeTab = activeTab
        },
        change_basic_showTab: (state, activeTab) => {
            state.basic_show_Tab = activeTab
        },
        change_early_activeTab: (state, activeTab) => {
            state.early_activeTab = activeTab
        },
        change_early_showTab: (state, activeTab) => {
            state.early_show_Tab = activeTab
        },
        change_ingestion_activeTab: (state, activeTab) => {
            state.ingestion_activeTab = activeTab
        },
        change_ingestion_showTab: (state, activeTab) => {
            state.ingestion_show_Tab = activeTab
        },
        change_longterm_activeTab: (state, activeTab) => {
            state.longterm_activeTab = activeTab
        },
        change_longterm_showTab: (state, activeTab) => {
            state.longterm_show_Tab = activeTab
        },
        change_senstivity_activeTab: (state, activeTab) => {
            state.senstivity_activeTab = activeTab
        },
        change_senstivity_showTab: (state, activeTab) => {
            state.senstivity_show_Tab = activeTab
        },


        upData_basic_Data: (state, tData) => {
            state.basic_Data = tData
        },
        upData_early_Data: (state, tData) => {
            state.early_Data = tData
        },
        upData_ingestion_Data: (state, tData) => {
            state.ingestion_Data = tData
        },
        upData_longterm_Data: (state, tData) => {
            state.longterm_Data = tData
        },
        upData_senstivity_Data: (state, tData) => {
            state.senstivity_Data = tData
        },
       
       


    },
    actions: {
        updateToken({
            commit
        }, token) {
            commit('UPDATE_TOKEN', token)
        },
        updateDeptId({
            commit
        }, deptId) {
            commit('UPDATE_DEPTID', deptId)
        },
        updateDeptName({
            commit
        }, deptName) {
            commit('UPDATE_DEPTNAME', deptName)
        },
        updateUserid({
            commit
        }, userid) {
            commit('UPDATE_USERID', userid)
        },
        updateUsername({
            commit
        }, username) {
            commit('UPDATE_USERNAME', username)
        },
        updateName({
            commit
        }, name) {
            commit('UPDATE_NAME', name);
        },
        updateTenementid({
            commit
        }, tenementId) {
            commit('UPDATE_TENEMENTID', tenementId)
        },
        updateSystemcode({
            commit
        }, systemCode) {
            commit('UPDATE_SYSTEMCODE', systemCode)
        },
        updateLogo({
            commit
        }, logo) {
            commit('UPDATE_LOGO', logo)
        },
        updateHomeOpenLogo({
            commit
        }, logo) {
            commit('UPDATE_homeOpenLogo', logo)
        },
        updateDeptType({
            commit
        }, type) {
            commit('UPDATE_DEPTTYPE', type);
        },
        updateDeptCode({
            commit
        }, code) {
            commit('UPDATE_DEPTCODE', code)
        },
        updateAvatar({
            commit
        }, url) {
            commit('UPDATE_AVATAR', url);
        },
        updateSellerId({
            commit
        }, sellerId) {
            commit('UPDATE_SELLER_ID', sellerId)
        },
        commit_systemId({
            commit
        }, sysId) {
            commit('update_systemId', sysId);
        },

        change_basic_activeTab({ commit }, activeTab) {
            commit('change_basic_activeTab', activeTab)
        },
        change_basic_showTab({ commit }, activeTab) {
            commit('change_basic_showTab', activeTab)
        },

        change_early_activeTab({ commit }, activeTab) {
            commit('change_early_activeTab', activeTab)
        },
        change_early_showTab({ commit }, activeTab) {
            commit('change_early_showTab', activeTab)
        },
        change_ingestion_activeTab({ commit }, activeTab) {
            commit('change_ingestion_activeTab', activeTab)
        },
        change_ingestion_showTab({ commit }, activeTab) {
            commit('change_ingestion_showTab', activeTab)
        },

        change_longterm_activeTab({ commit }, activeTab) {
            commit('change_longterm_activeTab', activeTab)
        },
        change_longterm_showTab({ commit }, activeTab) {
            commit('change_longterm_showTab', activeTab)
        },
        change_senstivity_activeTab({ commit }, activeTab) {
            commit('change_senstivity_activeTab', activeTab)
        },
        change_senstivity_showTab({ commit }, activeTab) {
            commit('change_senstivity_showTab', activeTab)
        },


        upData_basic_Data({ commit }, tData) {
            commit('upData_basic_Data', tData)
        },
        upData_early_Data({ commit }, tData) {
            commit('upData_early_Data', tData)
        },
        upData_longterm_Data({ commit }, tData) {
            commit('upData_longterm_Data', tData)
        },
        upData_ingestion_Data({ commit }, tData) {
            commit('upData_ingestion_Data', tData)
        },
        upData_senstivity_Data({ commit }, tData) {
            commit('upData_senstivity_Data', tData)
        },
        

    }
}

export default token
